package com.cyzy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cyzy.mapper.ScheduleMapper;
import com.cyzy.pojo.ClassSchedule;
import com.cyzy.service.ScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;

@Service
public class ScheduleServiceImple extends ServiceImpl<ScheduleMapper, ClassSchedule> implements ScheduleService {

    @Autowired
    private ScheduleMapper scheduleMapper;


    @Override
    public List<ClassSchedule> showSchedule(ClassSchedule classSchedule) {
        LambdaQueryWrapper<ClassSchedule> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(ClassSchedule::getClassId, classSchedule.getClassId());
        return scheduleMapper.selectList(queryWrapper);
    }
}
